﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
using OpenTK.Graphics.OpenGL;

namespace BlockEngine.Engine.Internal
{
    /// <summary>
    /// Represents a square texture and (possibly later) provides functions to manipulate it.
    /// </summary>
    class Texture
    {
        public readonly int Resolution; //Represents both the length and height of the texture. Textures can only be square.
        public readonly Bitmap Image;
        public Texture(Bitmap I)
        {
            Image = I;
            if (I.Width != I.Height)
                throw new Exception("Image is not square!");
            this.Resolution = I.Height;
        }
        public Texture(string Path)
        {
            if (!System.IO.File.Exists(Path))
                return;
            Image = new Bitmap(Path);

        }
        /*
        public void Rescale(int NewResolution)
        {

        }
        public void ChangePixel(int X, int Y, byte[] Color)
        {

        }
         */
    }
}
